<?php			
class ProductGroup_Form_ProductGroup_Detail extends Zend_Form
{
	public function __construct(Zend_Controller_Action $controller)
	{
		//product_group_code
		$product_group_code=$this->createElement ( 'text', 'product_group_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('product_group_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('product_group_code' ))
		->setAttrib ( 'class','lock' )
		;
		
		//product_group_warehouse_group_code
		$product_group_warehouse_group_code=$this->createElement ( 'select', 'product_group_warehouse_group_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('product_group_warehouse_group_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('product_group_warehouse_group_code' ))
		->setAttrib ( 'class','lock' )
		;
		
		//product_group_note
		$product_group_note=$this->createElement ( 'textarea', 'product_group_note' )
		->setLabel ( $controller->getHelper('common')->getCaption('product_group_note' ))
		->setDescription ( $controller->getHelper('common')->getDescription('product_group_note' ))
		->setAttrib ( 'class','lock' )
		;
		
		//product_group_name
		$product_group_name=$this->createElement ( 'text', 'product_group_name' )
		->setLabel ( $controller->getHelper('common')->getCaption('product_group_name' ))
		->setDescription ( $controller->getHelper('common')->getDescription('product_group_name' ))
		->setAttrib ( 'class','lock' )
		;
		
		//product_group_parent_group_code
		$product_group_parent_group_code=$this->createElement ( 'select', 'product_group_parent_group_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('product_group_parent_group_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('product_group_parent_group_code' ))
		->setAttrib ( 'class','lock' )
		;
		
		//product_group_level
		$product_group_level=$this->createElement ( 'text', 'product_group_level' )
		->setLabel ( $controller->getHelper('common')->getCaption('product_group_level' ))
		->setDescription ( $controller->getHelper('common')->getDescription('product_group_level' ))
		
		->setAttrib ( 'class','numeric lock' )
		;
		
		//product_group_status
		$product_group_status=$this->createElement ( 'radio', 'product_group_status' )
		->setLabel ( $controller->getHelper('common')->getCaption('product_group_status' ))
		->setDescription ( $controller->getHelper('common')->getDescription('product_group_status' ))
		->setAttrib ( 'class','lock' )
		->setMultiOptions(array(1=>'Kích hoạt',0=>'Vô hiệu'))
		->setValue(1)
		;
		
		$this->addElements ( array (
			$product_group_code,
			$product_group_name,
			$product_group_parent_group_code,
			//$product_group_warehouse_group_code,
			$product_group_note,
			$product_group_status,
		) );	
		
		$controller->getHelper ( 'common' )->form ( $this );
	}
}